<?php echo $this->Session->flash(); ?>
<h1>UNIDADES PERTENECIENTES AL PROYECTO <?php echo $this->Session->read('cod'); ?></h1>


<table  id="tabla" class="tabla" >
    <thead>
        <tr>

            <th>ÁREA (Ha.)</th>
            <th>CLASE AGROLÓGICA</th>
            <th>TOPOGRAFÍA Y RELIEVE</th>
            <th>DESCRIPCIÓN</th>
            <th></th>
            <th></th>

        </tr>
    </thead>
    <tbody>

        <?php
        foreach ($units as $unit):
            ?>

            <tr>

                <td><?php echo $unit['PhysiographicUnit']['area']; ?></td>
                <td><?php echo $unit['PhysiographicUnit']['clase_agrologica']; ?></td>
                <td><?php echo $unit['PhysiographicUnit']['topografia_relieve']; ?></td>
                <td><?php echo $unit['PhysiographicUnit']['descripcion']; ?></td>
                <td><?php echo $ajax->link("Editar", array('controller' => 'PhysiographicUnits', "action" => "edit", $unit['PhysiographicUnit']['id']), array('update' => 'unidades', 'complete' => 'mayusculas()', 'indicator' => 'load1')) ?></td>
                <td><?php echo $ajax->link("Borrar", array('controller' => 'PhysiographicUnits', "action" => "delete", $unit['PhysiographicUnit']['id']), array('update' => 'unidades', 'complete' => 'mayusculas()', 'indicator' => 'load1'), '¿Desea Eliminar El Registro?') ?></td>

            </tr>
        <?php endforeach; ?>
    </tbody>
</table>

</p><?php echo $ajax->link($html->image("adicionar1.png", array('width' => '35', 'heigth' => '35', 'alt' => 'Adicionar unidad')), array('controller' => 'PhysiographicUnits', "action" => "add"), array('escape' => false, 'update' => 'unidades', 'indicator' => 'load1', 'complete' => 'mayusculas()')); ?>
<div id="load1" style="display: none;">
    <?php echo $html->image('loading.gif', array('border' => "0", 'align' => 'center')); ?>
</div>

